// @ts-ignore
/* eslint-disable */
import request from "@/libs/request";

/** addUser POST /api/rice/add */
export async function addUserUsingPost(
    body: API.UserAddRequest,
    options?: { [key: string]: any }
) {
    return request<API.BaseResponselong>("/api/rice/add", {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
    });
}
/** updateUser POST /api/rice/update */
export async function updateUserUsingPost(
    // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
    body: API.UserUpdateRequest,
    options?: { [key: string]: any }
) {
    return request<API.BaseResponselong>("/api/rice/update", {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
    });
}
/** userLogin POST /api/rice/login */
export async function userLoginUsingPost(
    body: API.UserLoginRequest,
    options?: { [key: string]: any }
) {
    return request<API.BaseResponseFunRiceUser>("/api/rice/login", {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
    });
}
/** getCurrentUser GET /api/rice/current */
export async function getCurrentUserUsingGet(options?: { [key: string]: any }) {
    return request<API.BaseResponseFunRiceUser>("/api/rice/current", {
        method: "GET",
        ...(options || {}),
    });
}

/** deleteUser POST /api/rice/delete */
export async function deleteUserUsingPost(
    body: API.UserDeleteRequest,
    options?: { [key: string]: any }
) {
    return request<API.BaseResponselong>("/api/rice/delete", {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
    });
}

/** getUserList GET /api/rice/get */
/*export async function listUserByPageUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseListFunRiceUser>("/api/rice/list/page", {
    method: "GET",
    ...(options || {}),
  });
}*/



export async function   listUserByPageUsingPost(
    body: API.UserQueryRequest,
    options?: { [key: string]: any },
) {
    return request<API.BaseResponsePageUser_>('/api/rice/list/page', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
    });
}



/** userLogout POST /api/rice/logout */
export async function userLogoutUsingPost(options?: { [key: string]: any }) {
    return request<API.BaseResponseint>("/api/rice/logout", {
        method: "POST",
        ...(options || {}),
    });
}

/** registerUser POST /api/rice/register */
export async function registerUserUsingPost(
    body: API.UserRegisterRequest,
    options?: { [key: string]: any }
) {
    return request<API.BaseResponselong>("/api/rice/register", {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
    });
}



